<?php
/**
 * Created by JetBrains PhpStorm.
 * user: GenShunei
 * Date: 5/9/12
 * Time: 4:07 PM
 * To change this template use File | Settings | File Templates.
 */
class OtherManager
{
    private $db;

    function __construct($db){
        $this->db = $db;
    }

    public function getDistrict($pname){
        $result = "";
        $query = "SELECT district FROM district WHERE province= '$pname'";  //echo $query;
        $this->db->dbQuery($query);
        while($row = mysql_fetch_assoc($this->db->result['content'])){
            $result .= '<option value="'.$row['district'].'">'.$row['district'].'</option>';
        }
        echo $result;
    }
}
